package game;
import java.awt.Color;
import java.awt.Point;

import javax.swing.ImageIcon;
import javax.swing.JLabel;


public class PlayerDAO extends JLabel{
	public final static int FIGURE_DOG=0;
	public final static int FIGURE_CAR=1;
	private int choosenFigure;
	private int money;
	private String name;
	private ImageIcon figure;
	private int field;
	private int dices;
	private Color color;
	
	public PlayerDAO (Color inColor, String inName, int inFigure){
		color=inColor;
		money=10000000;
		choosenFigure=inFigure;
		name= inName;
		dices=0;
		field=0;
	}
	public Point getCenter(){
		return new Point (
				this.getPreferredSize().width/2,
				this.getPreferredSize().height/2
				);
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}
	
	public void addMoney(int money) {
		this.money += money;
	}
	
	public void subMoney(int money) {
		this.money -= money;
	}

	public String getName() {
		return name;
	}
	public int getField() {
		return field;
	}

	public void setField(int field) {
		this.field = field;
	}
	public int getDices() {
		return dices;
	}
	public void setDices(int dices) {
		this.dices = dices;	
	}

	public void setFigure(ImageIcon figure) {
		this.figure = figure;
		this.setIcon(this.figure);
	}
	public int getChoosenFigure() {
		return choosenFigure;
	}
	public Color getColor() {
		return color;
	}
	public void setColor(Color inColor) {
		color = inColor;
	}
	
	
}
